1. Field of the Invention
The invention relates to optical storage media, and more particularly to the defect management of optical storage media.
2. Description of the Related Art
Optical storage media, such as Compact Discs (CD), Digital Versatile Discs (DVD), and Magneto-Optical (MO) discs, have become the most popular storage media for digital data. Optical discs have some advantages over magnetic discs. They have higher capacities as removable modules, and they are not subject to head crashes or corruption from stray magnetic fields. They also have a 30-year life and are less vulnerable to extremes of hot and cold. As other storage media, data recording errors in an optical storage media may occasionally occur, such as bad sectors. Thus, an optical storage media requires recording the location of defective data sectors and storing the data of the bad sectors onto other good sectors. This is called “defect management”.
FIG. 1 shows an example of the conventional method for defect management of an optical storage medium. The optical storage medium may be a CD, DVD, or MD. An optical disc drive is used to read the optical storage medium or write data on the optical storage medium. The optical storage medium has a data area 102 and a replacement area 104. The data area includes recording units for storing user data. The replacement area 104 has replacement units for replacing the defective recording units to store the corresponding user data. Each recording unit can be addressed by a physical unit number (PUN), and each replacement unit can be address by a physical replacement unit number, denoted by DF.
For example, the data area 102 includes four consecutive recording units of which the physical unit numbers are respectively 0, 1, 2, and 3. The recording units PUN0˜PUN3 are assumed to be damaged. When the optical disc drive intends to store a unit of data in the recording units PUN0˜PUN3, errors occur because the four recording units are defective. Thus, the data cannot be directly stored in the four defective recording units of the data area 102. Instead, the optical disc drive allocates another four replacement units DF0, DF1, DF2, and DF3 in the replacement area 104, and respectively stores the data originally intended to be stored in the defective recording units PUN0, PUN1, PUN2, and PUN3 in the successive replacement units DF0, DF1, DF2, and DF3. These replacement units of the replacement area 104 are respectively replacing the recording units PUN0, PUN1, PUN2, and PUN3. In addition, the mapping relation between the defective recording units PUN0, PUN1, PUN2, and PUN3 and replacement units DF0, DF1, DF2, and DF3 are recorded in a defect table.
When a host attempts to read the unit of data from the defective recording unit PUN0 through PUN3 via the optical disc drive, the optical disc drive first search the defect table for the replacement unit. Because the replacement unit corresponding to the defective recording unit PUN0 is DF0, the optical disc drive then retrieves data in the replacement unit DF0. Because the access time of a optical disc drive mainly proportional to track-seeking frequency, when the optical disc drive reads the replacement unit DF0, all other replacement units DF1, DF2, and DF3 which are corresponding to the same unit of data are read in sequence to reduce track-seeking frequency. And then the optical disc drive delivers the retrieved data of the replacement units DF0, DF1, DF2, and DF3 to the host. This situation is called “non-fragmented case”, because the replacement units of the sequential data are stored in successive replacement units.
The replacement units of the defective recording units, however, are not always in succession to each other. FIG. 2 shows another example of the conventional method for defect management of an optical storage medium. In this example, the data area 202 includes four successive defective recording units PUN0, PUN1, PUN2, and PUN3. The replacement units corresponding to the four defective recording units, however, are respectively DF0, DF300, DF200, and DF100, which are not sequentially arranged as in the example of FIG. 1. This is because the errors of the four defective recording units happen at different time. The defective recording unit PUN0 is first damaged, and the optical disc drive allocates the replacement unit DF0 to store the corresponding data of defective recording unit PUN0. The defective recording units PUN3, PUN2, and PUN1 are then sequentially damaged at different time, and the optical disc drive sequentially allocates the replacement units DF100, DF200, and DF300 to respectively store the corresponding data of defective recording units PUN1, PUN2, and PUN3. As a result, the replacement units of the defective recording units are separated by a great distance. This situation is called “fragmented case”, because the replacement units corresponding to the successive defective recording units PUN0 through PUN3 are not successively.
When a host attempts to read the unit of data from the defective recording units PUN0 through PUN3 of FIG. 2 via the optical disc drive, the optical disc drive needs spend a long time to retrieve the unit of data from the discrete replacement units. Accordingly, to reduce track-seeking frequency, the four replacement units DF0, DF1, DF2, and DF3 are accessed together. The replacement units DF1, DF2, and DF3, however, are not replacement units in successive as shown in the situation of FIG. 1. Therefore, the optical disc drive need to search the defect table to locate the replacement units DF300, DF 200, and DF100 respectively. Because the replacement units DF300, DF 200, and DF100 are separated by a great distance, reading the replacement units DF300, DF 200, and DF100 respectively requires a track-seek operation. That is to say, reading data from the defective recording units PUN0˜PUN3 requires four track-seeking events, thus increasing the access latency of the optical storage medium. Therefore, a method for defect management of an optical storage medium is required to prevent the fragmented case and to reduce the access latency is desirable.